package com.example.auth.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.example.db.annotations.ID;
import com.example.db.annotations.Table;
import com.example.db.annotations.TableField;

import java.util.Date;
import java.util.List;

/**
 * @Classname MenuModel
 * @Description TODO
 * @Date 2022/7/29 11:07
 * @Created by XiongXiong
 * @Author: X.I.O
 */
@Table("sys_menu")
public class MenuModel {

    @ID
    private Integer id;

    @TableField("pid")
    private Integer pid;

    @TableField("title")
    private String title;

    @TableField("href")
    private String href;

    @TableField("icon")
    private String icon;

    @TableField("target")
    private String target;

    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    @TableField("createdate")
    private Date createdate;

    @TableField("isdel")
    private Integer iddel;

    /**
     * 权限
     */
    @TableField("authority")
    private String authority;

    /**
     * 是否是菜单(0是,1不是)
     */
    @TableField("ismenu")
    private Integer ismenu;

    /**
     * 排序码
     */
    @TableField("orderNumber")
    private Integer orderNumber;

    private List<MenuModel> child;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getIdDel() {
        return iddel;
    }

    public void setIdDel(Integer idDel) {
        this.iddel = idDel;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getHref() {
        return href;
    }

    public void setHref(String href) {
        this.href = href;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getTarget() {
        return target;
    }

    public void setTarget(String target) {
        this.target = target;
    }

    public List<MenuModel> getChild() {
        return child;
    }

    public void setChild(List<MenuModel> child) {
        this.child = child;
    }

    public Date getCreateDate() {
        return createdate;
    }

    public void setCreateDate(Date createDate) {
        this.createdate = createDate;
    }

    public Date getCreatedate() {
        return createdate;
    }

    public void setCreatedate(Date createdate) {
        this.createdate = createdate;
    }

    public Integer getIddel() {
        return iddel;
    }

    public void setIddel(Integer iddel) {
        this.iddel = iddel;
    }

    public String getAuthority() {
        return authority;
    }

    public void setAuthority(String authority) {
        this.authority = authority;
    }

    public Integer getIsmenu() {
        return ismenu;
    }

    public void setIsmenu(Integer ismenu) {
        this.ismenu = ismenu;
    }

    public Integer getOrderNumber() {
        return orderNumber;
    }

    public void setOrderNumber(Integer orderNumber) {
        this.orderNumber = orderNumber;
    }

    public MenuModel(Integer id, Integer pid, String title, String href, String icon, String target, Date createdate, Integer iddel, String authority, Integer ismenu, Integer orderNumber, List<MenuModel> child) {
        this.id = id;
        this.pid = pid;
        this.title = title;
        this.href = href;
        this.icon = icon;
        this.target = target;
        this.createdate = createdate;
        this.iddel = iddel;
        this.authority = authority;
        this.ismenu = ismenu;
        this.orderNumber = orderNumber;
        this.child = child;
    }

    public MenuModel() {
    }
}
